     <!DOCTYPE html>  
<html xmlns="http://www.w3.org/1999/xhtml"  
      xmlns:th="http://www.thymeleaf.org"
      xmlns:sec="http://www.thymeleaf.org/thymeleaf-extras-springsecurity4"">
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link rel="stylesheet" href="@{/resources/bootstrap-table-master/assets/bootstrap/css/bootstrap.min.css}"/>
    <link rel="stylesheet" href="@{/resources/bootstrap-table-master/src/bootstrap-table.css}"/>
 <body>       
 	<div class="modal-dialog">
	<div class="modal-content">
    <div class="modal-body">
<form class="form-horizontal" method="post" name="tblTaskEditForm" id="tblTaskEditForm" role="form">
	<input type="hidden" name="seqid" th:value="${sysUser.seqid }"/>
	<input type="hidden" name="roleName" id="roleName" th:value="${sysUser.roleName }"/>
		  <div class="form-group">
    		<label for="name">名称</label>
    		<input type="text" class="form-control" id="name" name="username"  placeholder="请输入名称" th:value="${sysUser.username }"/>
  		</div>
		  <div class="form-group">
    		<label for="name">密码</label>
    		<input type="text" class="form-control" id="password" name="password"  placeholder="请输入密码" th:value="${sysUser.password }"/>
  		</div>
  		  <div class="form-group">
  		    <label for="name">角色</label>
			    <select name="roleId" id="roleId" class="form-control">
				   <option th:each="sysRole:${sysRoleList}" th:value="${sysRole.seqid}" th:text="${sysRole.name}"    th:selected="(${sysRole.seqid} == *{sysUser.roleId})" >Credit card</option>
			    </select>
    	 </div>
		  <input type="button" class="btn btn-default" id="sub" value="提交" />
		   <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
		  </form>
			</div>
		</div><!-- /.modal-content -->
		</div><!-- /.modal -->

		<script type="text/javascript">
		$(document).ready(function() {
				$('#sub').click(function(){
					  $('#roleName').val($("#roleId").find("option:selected").text());
			        $.post('sysUser_save.json',$('#tblTaskEditForm').serialize(),function(result){
					$('#table').bootstrapTable('refresh');  
				  	$('#myModal').modal('hide');
					});
			});
			
			 $('#myModal').on('hidden.bs.modal', function () {$(this).removeData()});
			});
			</script>
				</body>
	</html>